/**
 *   用户信息
 */
import request from '@/utils/request';
var userApiPrefix = process.env.userApiPrefix;

// 用户信息
export async function getUserinfo(data) {
  return request(
    `${userApiPrefix}/v1/account/token/userinfo`,
    {
      method: 'GET',
      params: data.params,
    },
    process.env.apiUrl,
  );
}

// 退出登录 （没对接）
export async function clearLogin(data) {
  return request(
    `${userApiPrefix}/simulate/clearLogin`,
    {
      method: 'POST',
      params: {},
      body: JSON.stringify({ ...data.body }),
    },
    process.env.apiUrl,
  );
}

// 获取用户列表
export async function getUserList(data) {
  return request(
    `${userApiPrefix}/v1/account/list/${data.params.pageSize}/${data.params.pageNum}`,
    {
      method: 'GET',
      params: data.params,
    },
    process.env.apiUrl,
  );
}
